<?php $this->import('Header') ?>
<?php $this->addCss('css/jquery.fancybox.css') ?>
<div class="container single">
	<div class="row">
		<div class="col-xs-2 menu">
			<?php $this->import('Single/Left') ?>
		</div>
		<div class="col-xs-10">
			<div class="content-top">
				<img src="/Resource/images/single.jpg">
			</div>
			<div style="height: 5px;"></div>
			<div class="star hidden">
				<div class="well well-sm dog-info">
					<p class="bg-title title">
						<span>单身狗明星</span>
					</p>
					<div class="photo-box">
						<div class="list">
							<?php for ($i = 0; $i < 5; $i++) { ?>
								<div class="item">
									<a href="/dog_u11.html"><img src="/Resource/images/pt_4.jpg"></a>
									<div class="dog-name">紫薇</div>
								</div>
							<?php } ?>
						</div>
					</div>
				</div>
			</div>
			<div class="article">
				<ol class="breadcrumb">
					<li><a href="/single.html">单身狗专区</a></li>
					<?php $i = 0; foreach ($parentCategoryInfo as $val) { $i++; ?>
						<?php if ($i == count($parentCategoryInfo)) { ?>
							<li class="active"><?php echo $val['CategoryName'] ?></li>
						<?php } else { ?>
							<li><a href="javascript:;"><?php echo $val['CategoryName'] ?></a></li>
						<?php } ?>
					<?php } ?>
				</ol>
				<div class="well well-sm dog-info">
					<p class="bg-title title">
						<span>七嘴八舌</span><span class="sum">共<?php echo $pager->count ?>篇</span>
						<?php if ($categoryId) { ?>
							<a href="/single/add.html" class="right"><i class="glyphicon glyphicon-plus"></i> 发新帖</a>
						<?php } else { ?>
							<a href="/single/add.html" class="js-article-add right"><i class="glyphicon glyphicon-plus"></i> 发新帖</a>
						<?php } ?>
					</p>
					<ul class="article-list">
						<?php if ($articleList) { ?>
							<?php foreach ($articleList as $article) { ?>
								<li class="row">
									<div class="col-xs-7">
										<a href="/single/detail_<?php echo $article['ArticleId'] ?>.html"><?php echo $article['Title'] ?></a>
										<?php if ($article['ImgList']) { $imgList = explode(',', trim($article['ImgList']));$imgList = array_slice($imgList, 0, 4);{ ?>
											<div class="list-img">
												<?php foreach ($imgList as $img) { ?>
													<a href="/single/detail_<?php echo $article['ArticleId'] ?>.html" class="img-rounded"><img data-src="<?php echo $img ?>"></a>
												<?php } ?>
											</div>
										<?php } } ?>
									</div>
									<div class="col-xs-5 do">
										<a class="di" href="/dog_u<?php echo $article['UserId'] ?>.html"><i class="glyphicon glyphicon-user"></i> <?php echo $article['UserInfo']['Username'] ?></a>
										<span class="di"><i class="glyphicon glyphicon-time"></i> <?php echo date('Y-m-d', $article['CreateTime']) ?></span>
										<span class="di"><i class="glyphicon glyphicon-eye-open"></i> <?php echo $article['ViewNumber'] ?></span>
										<span class="di"><i class="glyphicon glyphicon-comment"></i> <?php echo $article['CommentNumber'] ?></span>
									</div>
								</li>
							<?php } ?>
						<?php } else { ?>
							<span>暂时没有内容哦！不放你来<a href="/single/add.html">发布</a>一篇吧？</span>
						<?php } ?>
					</ul>
					<?php \Controller\UC\Pager::instance()->run(array('pager' => $pager)) ?>
				</div>
			</div>
		</div>
	</div>
</div>
<?php $this->import('Footer') ?>
<script>
	seajs.init();
</script>
